#include<iostream>
#include<string.h>
using namespace std;
int main(){
  char str[33];
  char arr[][4]={"er","ly","ing"};
  scanf("%s",str);
  int len=strlen(str);
  for(auto&x:arr){
    int l=strlen(x);
    if(len>l&&strcmp(x,str+len-l)==0){
      str[len-l]=0;
      break;
    }
  }
  cout<<str;
}